function addTogether(...args) {
    if (typeof args[0] !== "number") return;

    if (args.length > 1) {
        if (args.some(item => typeof item !== "number")) return;
        return args.reduce((total, current) => total + current);
    } else {
        return num => (typeof num === "number" ? num + args[0] : undefined);
    }
}

addTogether(2);
